"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = useWave;
var _WaveEffect = _interopRequireDefault(require("./WaveEffect"));
function useWave(nodeRef, className) {
  function showWave() {
    var _a;
    const node = nodeRef.current;
    // Skip if not exist doc
    const container = ((_a = node.getRootNode) === null || _a === void 0 ? void 0 : _a.call(node)) || (node === null || node === void 0 ? void 0 : node.ownerDocument);
    if (container) {
      (0, _WaveEffect.default)(container, node, className);
    }
  }
  return showWave;
}